package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class SysModule implements Serializable {

	private static final long serialVersionUID = -1455149299690301091L;

	//fields
	private java.lang.Integer moduleId;
	private java.lang.String moduleName;
	private java.lang.String moduleDesc;

	//default constructor
	public SysModule() {
	}

	//getter
	public java.lang.Integer getModuleId() {
		return moduleId;
	}
	public java.lang.String getModuleName() {
		return moduleName;
	}
	public java.lang.String getModuleDesc() {
		return moduleDesc;
	}

	//setter
	public void setModuleId(java.lang.Integer moduleId) {
		this.moduleId = moduleId;
	}
	public void setModuleName(java.lang.String moduleName) {
		this.moduleName = moduleName;
	}
	public void setModuleDesc(java.lang.String moduleDesc) {
		this.moduleDesc = moduleDesc;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof SysModule))
			return false;

		final SysModule sysModule = (SysModule)other;
		if (!this.moduleId.equals(sysModule.getModuleId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(moduleId).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("SysModule[")
			.append("moduleId=").append(moduleId).append(", ")
			.append("moduleName=").append(moduleName).append(", ")
			.append("moduleDesc=").append(moduleDesc).append("]").toString();
	}
}